If you want to do vision experiments on your Macintosh computer, and haven’t programmed a Mac before, there are various things you should get for yourself. I’ve listed what I consider essential. The stuff I use. There are lots of baby books that hold your hand while you learn, but the ones that I’ve looked at weren’t helpful for setting up vision experiments. They’re oriented towards producing Mac-like applications with the right look and feel, which is unimportant when the experimenter is the only person that will ever run the program. Be warned that the bible, Inside Macintosh, is intimidating at first. The classic comment about Inside Mac is that you have to have read the rest to understand any part. Fortunately, the new edition, called the New Inside Macintosh is much more readily assimilable. Mac programming is tough going at first, but I’ve come to like it, as the Apple routines are generally intelligent solutions to complicated problems. Anyway, by looking at the sources for the various demos in the VideoToolbox you should be able to get going much more quickly than I did. Good luck. -Denis Pelli
At this point the entire videotoolbox, including all demos, runs native on PowerPC, and it's very fast. I'm very happy with the PowerPC 6100/60AV ($2,000 academic) and the Metrowerks CodeWarrior Gold C compiler ($100 academic). I see little point in spending more money for the faster PowerPC's since the increased cost is far in excess of the speed increase, and it seems silly to invest in NuBus slots since the future clearly belongs to PCI slots.
If you like this file, you may also want to look at a some FAQ ("frequently asked questions") files from the Mac programming section of UseNet.
NOTE: the archive addresses, above and below, e.g. "ftp://...", are in a standard format called "URL" (Uniform Resource Locator) that most internet programs now prefer. If you're going to be downloading stuff, I highly recommend that you begin by getting Anarchie, which is currently the handiest ftp downloader:
by Brian Kernighan and Dennis Ritchie, Prentice Hall, 1988
This book describes the new Standard C, which most commercial compilers conform to.
Power Macintosh Programming Starter Kit
by Tom Thompson, Hayden Books, 1994
"A good introduction to MetroWerk's CodeWarrior, the other best programming environment for the mac, the only one to use if you're building PPC code, and my current favorite. The enclosed CD has a limited version of CodeWarrior (you can only work on the projects included in the disc - can't create new ones), and example code. Covers a lot of toolbox issues that are not explored in other introductory books and the PPC architecture in detail. Assumes working knowledge of C, and the toolbox." (Book review posted on cwarrior@netcom.com by nick@pitt.edu).
THINK C
A C compiler and programming environment (combined editor, linker, librarian, loader) for 680x0 Macintoshes only. It’s very good, but it seems that Symantec is dropping it (doing maintenance releases only) in favor of their C++. For more money you can get Symantec C++, which includes THINK C 7 and Apple's universal headers as part of the package. The VideoToolbox is pure C (with a couple bits of assembly), and makes no use of C++. The upgrade from THINK C 6 to 7 is free, but doesn't include the universal headers.
Version 7 is hardly changed from version 6, basically a slight enhancement of the user interface of the Symantec Project Manager, and fixing a few bugs in the THINK C compiler. (There are a few extra things--AppleScript support and Apple's Universal Headers--that are useful to THINK C users, but which you'll get only if you pay for the full Symantec C++ 7 package.) In a pinch, you can use THINK C 5, but the upgrade from 5 to 7 is inexpensive and improves the user interface significantly. It appears that Symantec is basically dropping THINK C, since it hasn't changed (significantly) since version 5, and since they haven't announced any plans to port it to the PowerPC. (I've also heard that none of the authors work for them any longer.) Symantec is concentrating on C++ (which is based on Zortech C++, not THINK C).
Symantec C++ (including THINK C 7) $499
THINK C 6 $299
Symantec Corporation
10201 Torre Ave
Cupertino, CA 95014
(800) 800-1438 fax
(800) 441-7234
You can download Symantec's updates from:
ftp://devtools.symantec.com/DTS Server Drive /ftp/Macintosh/Updates/DevTools/ v7.0.Patch.READ.ME
ftp://devtools.symantec.com/DTS Server Drive /ftp/Macintosh/Updates/DevTools/SymThCv6.0->v7full.sea.Hqx
ftp://devtools.symantec.com/DTS Server Drive /ftp/Macintosh/Updates/DevTools/SC++_EDS_7.0.4.sea.hqx
Until now the main alternative to THINK C has been Apple’s MPW C, which is slow, and clumsy, at least in comparison to THINK C. (The only thing I use MPW for is CompareFiles.) However, Metrowerks CodeWarrior C compiler, first released in January '94, is now at version 4.5, and gets rave reviews. The Gold version supports both 680x0 and PowerPC. They copied most of what Symantec did right, and then added their own improvements. (See comments in the VideoToolbox "Read me" document.) There are two versions. Bronze $99 generates 680x0 code only; Gold $399 ($99 academic) generates both 680x0 and PowerPC code.
Metrowerks CodeWarrior C is less than a year old; the first beta was released in January, 1994. It's already become very popular and is quite polished. There are some cosmetic console problems, which are quite tolerable, and which I'm confident will be fixed in version CW5, which is promised for January, 1995. At present, assignment of structs larger than 32 KB doesn't work (Bug No. BR4516). (The manual says, incorrectly, that structs cannot exceed 32KB, but the restriction was in fact eliminated in version CW4.) The long double type is supposed to be 16 byte, but is actually 8 byte (like double), making it incompatible with the long double math library. The built-in console prints returns as linefeeds (Bug No. T509). I sent a note explaining how and why MPW and THINK C deal with '\r' and '\n', and the pros and cons of the two alternative ways that CodeWarrior might deal with them without losing information as it presently does by mapping both to the same character (Bug No. T509). When the program asks for input from stdin, the user must manually select the console window if it isn't already frontmost, unless your program does it for the user, e.g. by calling SelectWindow(__SIOUXtextWindow). iscntrl(0) returns 0 but should return 1 (Bug No. BR4415). CodeWarrior does not recognize the "%#s" printf format used by MPW and THINK C to print pascal strings, so you have to convert your string to C style before printing it.
Thus far Metrowerks has been very responsive in accepting all my bug reports (issuing bug numbers and promises to fix) and suggestions (which they forwarded to engineering with no promises). Hopefully these seeds will grow up into fixs. Unfortunately Metrowerks doesn't publish a bug list. The following bugs which I found in version CW4 were fixed in version CW4.5. The compiler generated bad code for the assignment a[i][j][k][!m]=1 (Bug No. BR4183). Enum char arguments failed to be promoted (to int) when the corresponding parameter was untyped (e.g. in printf) (Bug No. T517). In the 2-byte-int version of the Standard C library, the functions memset and calloc crashed if asked to zero more than 64KB (Reference Nos. ES7266 and ES7268). The console failed to print characters with ascii codes higher than 127 (Bug No. T467), and crashed if asked to backspace '/b' beyond the left margin (Bug No. T513).
CodeWarrior
Metrowerks Inc.
The Trimex Building, Route 11, Mooers, NY 12958 USA
(514) 747-5999 voice
(514) 747-2822 fax
sales@metrowerks.com
EDUCATIONAL PRICES:
Gold $99
$15 shipping and handling for US orders. You must fax BookMasters proof that you are either a student or officially affilliated with a University.
BookMasters
1-800-247-6553
(419) 281-6883 fax
Distributed in the United Kingdom by Full Moon Software
0727 844232 and 0628 660242
0727 856139 fax
cw.sales@ctalk.exnet.com
Updates to CodeWarrior are posted on:
ftp://sumex-aim.stanford.edu/info-mac/dev/
http://www.iquest.com/~fairgate
MPW Pro
(Macintosh Programmer's Workbench)
$495 ($195 to upgrade from MPW)
APDA (address appears at end of this document)
This is a new package from Apple, providing a complete development environment (C, Pascal, and Assembler; 68k and PowerPC) on one CD-ROM. Apparently it's the same CD-ROM that you would get by subscribing to ETO (minus Symantec C++), without the printed manuals. Most people find MPW slow and clumsy, and prefer CodeWarrior or THINK C. However, Apple includes a bunch of pre-release tools on their ETO disks that might be handy.
Essential Tools and Objects CD-ROM (also called “ETO”)
$1,095 for first year, $400/year thereafter. ($300 credit for owners of MPW or MPW Pro.)
APDA
I don’t subscribe to this--it seems too expensive--but you may want to. It’s updated 3 times a year and has the latest versions of Apple’s development tools, MPW, C, etc. It includes MPW Pro, Symantec C++, and 21 printed manuals. Doesn't include the Developer Mailings. (The important difference between MPW Pro and ETO is that ETO is a subscription so they keep sending you the latest disk, 3 times a year, whereas you buy MPW Pro once, no updates. I don't understand why the price structure is so needlessly confusing.)
THINK Reference 2
From Symantec. An online reference manual summarizing most of the information in the Inside Mac books, volumes I-VI. Highly recommended. $129
ftp://devtools.symantec.com/DTS Server Drive /ftp/Macintosh/Updates/DevTools/THINK-Ref-2.0.1-Updater.sit
Numerical Recipes In C Set for Macintosh, 2nd ed.
(textbook, example book, and disk) $90
Useful book and mathematical library in source form. You can read the code, understand what’s going on, and modify it if necessary. From:
Cambridge University Press
40 West 20th Street
New York, NY 10010-4211
(800)-431-1580
914-937-9600
New Inside Macintosh: Imaging with QuickDraw, Advanced Color Imaging (not yet released), Memory, Processes, ...
Designing Cards and Drivers, 3rd edition
(OBSOLETE: Inside Macintosh: Volumes I to VI, and X-Reference)
from:
Addison-Wesley
(800)-447-2226
or APDA
You’ll need these books, especially "Imaging with QuickDraw". The new edition is significantly easier to use than the original and includes examples in C, not just Pascal. (You'll still need Inside Mac VI until Apple releases "Advanced Color Imaging".)
MAGAZINES AND CATALOGS:
MacWEEK
Customer Service Department
P.O. Box 5821
Cherry Hill, NJ 08034
(609)-428-5000
Try to get a free subscription.
MacTech Magazine
PO Box 250055
Los Angeles, CA 90025-9555
310-575-4343
310-575-0925 fax
custservice@xplain.com
The only Mac magazine for programmers.
TidBITS
A free weekly email newsletter about Macintosh software and hardware published by Adam and Tonya Engst. To subscribe send email to info@tidbits.com
Information Alley
Apple's free email newsletter about Macintosh, published twice a month. To subscribe send message "SUBSCRIBE infoalley" to listproc@spock.austin.apple.com with subject "Information Alley". Omit the quotes.
develop: The Apple Technical Journal
$27 in US, $47 outside US.
APDA (address appears at end of this document)
The develop magazine has four issues per year. It has lots of examples and helpful in-depth explanations. I've learned a lot from the magazine. The accompanying CD includes useful documentation: Inside Mac and Tech Notes.
Subscription to the Developer Mailing. Each month you receive a CD. $250/year plus shipping
APDA
These CDs are a useful reference, including documentation and sample code, for anyone developing Mac software.
ONLINE SERVICES:
Who can answer your Macintosh programming question? You can try posting it on UseNet or Compuserve. Somebody knowledgeable might jump in. (Apple engineers often participate in UseNet, rarely in CompuServe.) If you sell a commercial Mac product you may qualify to become an Apple Partner. For $1,500/year Apple engineers will answer your questions by email, provided you've already consulted the relevant manuals.
UseNet
The comp.sys.mac.programming UseNet news group has knowledgeable active discussion. Experts at Apple often jump in with helpful answers to thorny questions. You can participate in UseNet from your your Mac using telnet (NCSA Telnet and MacIP are both free) to log into a local unix system. Or you might use Nuntius (available by ftp from the Info-Mac archive) if you can get tcp/ip access to a net news server.
CompuServe Information Service
P.O. Box 20212
Columbus, OH 43220
(800)-848-8199
If you can’t join UseNet, then you may want to join CompuServe, to follow the discussions and post your seemingly insoluble Macintosh problems on the bulletin boards, MacPro, MacDev, or Symantec:THINK C, to get free advice from experts. Buy the program Navigator from CompuServe, as it makes CompuServe much easier to use. You’ll need a modem.
AppleLink
(408) 974-3309
ALINK.MGMT@applelink.apple.com
AppleLink is Apple’s bulletin board and email system. It provides some system software updates and technical information. Most companies that make Macintosh products have AppleLink accounts, and you can use the online directory to get their email addresses. You’ll need a modem.
Anyone can submit a bug report to APPLE.BUGS@Applelink.Apple.com. They prefer, but don’t require, a certain format that is produced automatically by a hypercard stack called Apple Bug Reporter, which can be downloaded from:
ftp://ftp.apple.com/dts/mac/bugs/
SOFTWARE ARCHIVES ACCESSIBLE THROUGH THE INTERNET:
The Providers of Commercial Internet Access (POCIA) Directory contains hundreds of entries for Internet providers, which include addresses, telephone numbers, email addresses, and pricing. It is indexed by area code (for the U.S. and Canada) and by country (for the rest of the world). POCIA is available at the following Web and FTP sites: (Courtesy TidBITS)
Mosaic for the Macintosh, National Center for Supercomputer Applications in Urbana, Illinois. A general purpose user interface to the internet for browsing and downloading.
"Anarchie" is a great new program that makes it easy to find and download software available on public internet sites. You tell it the name (possibly incomplete) of the program you want. It consults an archie server and tells you from which sites it's available (with dates and sizes) and you can just double click any line to download the file. Here are two sites from which you can download Anarchie:
The Internet Starter Kit for Macintosh, 2nd edition, by Adam C. Engst.
This book includes a free disk that has MacTCP and lots of other important utilities for accessing the Internet.
Published by Hayden Books.
$29.95 USA $37.95 Canada.
Hayden Books
201 West 103rd Street
Indianapolis, IN 46290 USA
800/428-5331 orders
317/581-3500 orders
800/448-3804 fax
317-581-3550 fax
orders@hayden.com
FTP is a file transfer protocol used to transfer files across the Internet. FTP programs typically have very rudimentary user interfaces. Some of the bigger ftp servers are now also Gopher servers. Gopher (developed at University of Minnesota, originally for a campus-wide information server) is sort of a superset of ftp that provides a quite good user interface and allows access to a wide variety of Internet resources. Public ftp servers require that you log in as “anonymous and will accept any password, but it is considered a courtesy to supply your electronic address as the password. If for some reason you can’t use ftp or gopher, some of the sites will help you out by allowing you to request transmission of files to you by email.
There are two ways to use ftp from your Mac. The traditional, indirect, approach is to remotely log into a mainframe (preferably one running unix), use its ftp facilities to move the file to it, and then download the file from it. The modern, direct, approach requires that your AppleTalk network have a gateway to the Internet, so that you can run an ftp program on your Mac (provided you have Apple’s MacTCP init, available from APDA; many universities have site licenses). I recommend Anarchie or TurboGopher for anonymous ftp downloading and Fetch 2.1 for general ftp uploading and downloading. Both are free from the Info-Mac archive.
Info-Mac archives
ftp://sumex-aim.stanford.edu/info-mac/
gopher: Info-Mac Archives
email: send a query to Info-Mac-Request@sumex-aim.stanford.edu
(The VideoToolbox is in /info-mac/Development/SourceCode/) This is the largest collection of public domain Mac software. Unfortunately in 1994 user demand has overwhelmed the resources and it is now very difficult to access. There are many "mirror" sites all over the world that keep more-or-less up-to-date copies of Info-Mac and they're usually much easier to access. Here are a few that you might try:
email: send a query to macpsych-request@stolaf.edu
Alternative Collegiate Computer Association of New Mexico State University. Contains almost all freely distributable software mentioned in the FAQ lists for comp.sys.mac.misc, comp.sys.mac.system, and comp.sys.mac.apps.
ftp://rever.nmsu.edu/pub/macfaq/
The following Mosaic page is intended to serve as a single entry point to all Macintosh resources on the Web.
David Brainard (brainard@condor.psych.ucsb.edu) has created interface files that make it easy to use the VideoToolbox from within MATLAB. They're available by anonymous ftp. Also see VideoToolboxMATLAB.c in VideoToolboxSources.
Adam Engst, the author of The Internet Starter Kit for Macintosh (above) also maintains a Mac archive
ftp://ftp.tidbits.com/pub/tidbits/tisk/
http://www.tidbits.com/tidbits/index.html
SOFTWARE ARCHIVES ON CD-ROM:
Info-Mac CD-ROM II (May '93) $49.95 plus shipping.
A May ‘93 snapshot of the info-mac archive on a CD-ROM containing about 600 MB. (Includes the February 1993 edition of the VideoToolbox.)
Pacific HiTech, Inc.
4760 Highland Drive, Suite 204
Salt Lake City, Utah 84124
800-765-8369 (orders only)
801-278-2042
801-278-2666 (fax)
71175.3152@compuserve.com
Apprentice $35 (includes shipping in US and Canada)
CD-ROM of 450 MB of Mac source code and utilities.
(Includes the May 1994 edition of the VideoToolbox.)
Celestin Company
1152 Hastings Avenue
Port Townsend, WA 98368
800 835 5514
206 385 3767
206 385 3586 fax
celestin@pt.olympus.net
EMAIL:
Your email service ought to have a gateway to Internet; complain if it doesn’t. Here’s how to send Internet mail to various commercial services when you only know the person’s service-specific address:
America Online: “Adam Engst” becomes “adamengst@aol.com”.
MCI: Joe Doe 123-4567 becomes “Joe_Doe@mcimail.com” or “1234567@mcimail.com”.
Prodigy: user ID “abcd12a” becomes “abcd12a@prodigy.com”
Eudora is a popular free email program. I haven't tried it but I exchange mail with mainy people who do. Eudora, an electronic mail client for Internet users. QUALCOMM Incorporated, San Diego, California.
ftp://ftp.qualcomm.com/quest/mac/eudora/
HARDWARE:
In my experience a plain old (now obsolete) Mac II is fast enough for many things, but faster Macs can show bigger movies. If you’re going to synthesize images then make sure your computer has a floating point chip. So far we’ve never needed more than 8-bit color, making the obsolete Apple Toby and TFB video cards our favorites, because they work perfectly (unlike Apple’s 1992 crop of video cards--see the "Video synch" document), and they’re available for $90 from Shreve Systems (800-227-3971), but, of course, they don’t support the latest large monitors. We also like the built-in video on all of Apple’s newer computers because you can load images into them at extremely high speeds (try the demo TimeVideo), since they bypass the NuBus bottleneck. We use the mouse or keyboard to collect observer responses. We’ve bought a few Data Translation A/D boards to automate our photometry, moving the cards from machine to machine as needed, but they are probably not the best brand.
We're just starting to use a Power Mac 6100/60av. It appears to be excellent for vision research, even in emulation mode. Its university price is about $2,000, and its two built-in video ports are very fast; as fast as the fastest Quadra. We don't need any slots. If you want slots, you may want to wait to until May 1995 when Power Macs with PCI slots are scheduled to appear. The PCI bus is fast and is quickly becoming the bus of choice for Intel-based computers, so there will soon be a huge array of cards to choose from. (Making a PCI card compatible with both PowerPC and Intel processors will require a bigger "plug and play" ROM, but it seems likely that most manufacturers will take the trouble.)
You’ll want a fast CD-ROM drive, mainly to read Apple’s Developer CD-ROM disks.
You’ll need a modem to call CompuServe or AppleLink, and to dial in from home and elsewhere using AppleTalk Remote Access (ARA). 14,400 bits/s modems cost several hundred dollars, and for a bit more you can now get 28,800 b/s. (I'm happy with the 14k b/s Global Village modem in my PowerBook.) Phone lines are still expensive though, so you may want to cost-share by using a shared modem and a single phone line, in which case you'll want to devote an old Mac or buy an AppleTalk Remote Access server to connect the modem to your AppleTalk network.
APS Hyper DAT $1,399
APS Technologies
6131 Deramus
PO Box 4987
Kansas City, MO 642120=0087
(800)-354-1213
816-483-6100
816-483-3077 fax
My department uses a single DAT tape drive (with compression, from APS) and the Retrospect program to backup dozens of Macs every night automatically. We’re very happy with it. Retrospect maintains a historical backup so you can go back to older versions of your data, many backups ago. Get a sufficiently large-capacity tape drive so that you can do unattended incremental backups without having to change the tape.
Moustrak Pad (large 9”x11”, blue or gray). One for each Mac. You really need this. $9
Chip Merchant
9285 Chesapeake Drive
San Diego, CA 92123
(619)-268-4774
(619)-268-0874 fax
At $30 per megabyte it’s worth buying enough memory to take your computer up to at least 8 MB. (To show movies, we've taken several of our computers up to 24 or 40 MB.) This outfit has good prices.
MONITORS:
We’ve done nearly all our research using Apple’s High Resolution Monochrome monitors, which are inexpensive and adequate, though one could wish for higher luminance (100 cd/m^2 peak when new), better high voltage regulation, and dc coupling instead of dc restoration. I suspect that a color monitor might be better regulated and might be excellent used as a monochrome monitor. Use with the ISR Video Attenuator would require that you: 1. use only the green channel, or 2. build a video amplifier to drive all three channels from the single output of the video attenuator, or 3. snip two of the 75 ohm termination resistors inside the monitor and tie all three channels together.
A company called Dotronix just came out (10/94) with a high resolution (150 MHz) bright (300 cd/m^2) multisynch gray scale monitor (ASM2400 21"FS) for about $1450. Dotronix (715) 834-7785.
I know very little about color monitors, but people keep asking me to recommend one. Tom Robson of Cambridge Research Systems gave me a brochure for what appears to be a rather nice color monitor:
Sony 20-inch Trinitron Multiscan GDM-2038
field rate of 50 to 160 Hz
about 160 cd/m^2
$2,500
I just bought Apple's 17" Multiscan for about $900. It's a Sony Trinitron. Peak luminance is about 100 cd/m^2. Using the Monitors control panel, you can select among several resolutions.
RECOMMENDED:
(The free & shareware stuff is available from Info-Mac or CompuServe or both. You can use Anarchie to quickly search most of the world's ftp sites. To search Compuserve use their “GO MACFF” command.)
Anarchie - quickly find a file anywhere among all the world's public archives. Free.